from flask import Flask, request, render_template
# import config

app = Flask(__name__)


@app.route('/login_request/', methods=['POST'])
def login_request():
    print(request.form.get('username'))  # 'mark'
    print(request.form.get('password'))  # '123'
    if request.form.get('username') == 'mark' and request.form.get('password') == '123':
        return 'success'
    else:
        return 'error'


@app.route('/login/', methods=['GET'])
def login():
    return render_template('login.html')


if __name__ == '__main__':
    app.run()